/***********************************************
 * Filename:  		ShaderBase.h
 * Date:      		???
 * Mod. Date: 		???
 * Mod. Initials:	MVP
 * Author:    		Mikeal V. Perry
 * Purpose:   		The base class of shaders
 *					Renders with only positions
 ************************************************/

#ifndef _SHADERBASE_H
#define _SHADERBASE_H

#include <vector>

#include "Model.h"

class CShaderBase
{
	char m_szShaderName[32];			// The name of the shader
	std::vector<CModel> m_vModels;		// The list of models that use this shader
	int m_nVertUseFlags;				// Flags that determine the data needed for this shader

public:

	/*****************************************************************
	* CShaderBaseClass():	Default constructor
	*
	* Ins:					szShaderName
	*						nUsage
	* Outs:
	* Returns:			
	*
	* Mod. Date:			???
	* Mod. Initials:		MVP
	*****************************************************************/
	CShaderBase(const char* szShaderName, int nUsage);

	virtual ~CShaderBase(void);

	/*****************************************************************
	* AddModelToSet():	Adds the model to the shader's set
	*
	* Ins:				cMesh
	* Outs:
	* Returns:			
	*
	* Mod. Date:		???
	* Mod. Initials:	MVP
	*****************************************************************/
	void AddModelToSet(const CModel& cModel);

	/*****************************************************************
	* ClearModelList():	Clears the models from the list
	*
	* Ins:				
	* Outs:
	* Returns:			
	*
	* Mod. Date:		???
	* Mod. Initials:	MVP
	*****************************************************************/
	void ClearModelList();

	/*****************************************************************
	* CreateParameterHandle():	Creates a parameter block handle using the material
	*
	* Ins:				cMaterial
	* Outs:
	* Returns:			
	*
	* Mod. Date:		???
	* Mod. Initials:	MVP
	*****************************************************************/
	void CreateParameterHandle(TMaterial& tMaterial, unsigned int nShaderIndex);

	/***************
	*  Accessors
	***************/
	const char* GetShaderName() const {return m_szShaderName;}
	int GetModelAmount() const {return m_vModels.size();}
	int GetUsageFlags() const {return m_nVertUseFlags;}
	CModel& GetMeshes(int nIndex) {return m_vModels[nIndex];}

	/***************
	*  Mutators
	***************/
};
#endif

